<div class="gallery-grid">
  <input type="hidden" class="action-pagedata" value="{total:<{$total}>, pagecurrent:<{$page|default:1}>, pagetotal:<{$pagetotal}>}">
  <ul class="clearfix">
    <{foreach from=$goodsData key=key item=goods}>
    <li class="goods-item">
      <{assign var='imageset' value=$env.conf.image.image.set}>
      <div class="goods-pic" style="<{if $imageset.S.width}>width:<{$imageset.S.width}>px;<{/if}><{if $imageset.S.height}>height:<{$imageset.S.height}>px;line-height:<{$imageset.S.height-2}>px;*font-size:<{$imageset.S.height * 0.9}>px;<{/if}>">
          <{if $goods.products.promotion_type_name}>

          <a <{if $opentype eq 'new_page'}>target="_blank"<{/if}> href="<{link app=starbuy ctl=site_team act=index arg0=$goods.products.product_id arg1=$goods.products.promotion_type_id}>"><img class="action-goods-img" data-src="<{$goods.image_default_id|default:$imageDefault.S.default_image|storager:'s'}>" alt="<{$goods.name}>" style="<{if $imageset.S.width}>max-width:<{$imageset.S.width}>px;<{/if}><{if $imageset.S.height}>max-height:<{$imageset.S.height}>px;<{/if}>"></a>
          <{else}>
          <a  <{if $opentype eq 'new_page'}>target="_blank"<{/if}>  href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>"><img class="action-goods-img" data-src="<{$goods.image_default_id|default:$imageDefault.S.default_image|storager:'s'}>" alt="<{$goods.name}>" style="<{if $imageset.S.width}>max-width:<{$imageset.S.width}>px;<{/if}><{if $imageset.S.height}>max-height:<{$imageset.S.height}>px;<{/if}>"></a>
        <{/if}>
        <{if $goods.tags && $gallery_display_tag_goods == 'true'}>
        <{foreach from=$goods.tags item=tags}>
        <{if $tags.params.tag_showOnIndex == 'on'}>
        <{if $tags.params.tag_image}>
        <span class="img-tag-<{$tags.params.pic_loc}>" style="opacity:<{$tags.params.tag_opacity / 100}>;filter:alpha(opacity=<{$tags.params.tag_opacity}>)"><img src="<{$tags.params.tag_image|storager}>"></span>
        <{else}>
        <span class="text-tag-<{$tags.params.pic_loc}>" style="background-color:<{$tags.tag_bgcolor|default:'transparent'}>;color:<{$tags.tag_fgcolor}>;opacity:<{$tags.params.tag_opacity / 100}>;filter:alpha(opacity=<{$tags.params.tag_opacity}>)"><{$tags.tag_name}></span>
        <{/if}>
        <{/if}>
        <{/foreach}>
        <{/if}>
      </div>
      <div class="goods-info" style="text-align:center;">
        <{if !isset($goods.prepare)}>
          <{if $goods.products.promotion_type_name }>
            <h3 class="goods-name">
              <a <{if $opentype eq 'new_page'}>target="_blank"<{/if}> href="<{link app=starbuy ctl=site_team act=index arg0=$goods.products.product_id arg1=$goods.products.promotion_type_id}>"><{$goods.name}></a>
            </h3>
            <{else}>
            <h3 class="goods-name"><a <{if $opentype eq 'new_page'}>target="_blank"<{/if}> href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>"><{$goods.name}></a></h3>
          <{/if}>

        <{/if}>
         <!--预售商品的显示判断-->
        <{if $goods.prepare.promotion_type == 'prepare'}>
        <h3 class="goods-name"><a <{if $opentype eq 'new_page'}>target="_blank"<{/if}> href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>"><{$goods.name}></a>&nbsp;<e style="background-color: #ff0000;color:#fff">预售</e></h3>
        <{/if}>
        <div class="goods-price">
	<!-- add这里是验证--未登录不显示价格-黄智坤06-20   -->
	<{if $check_login == "login"}>
	<!-- end这里是验证--未登录不显示价格-黄智坤06-20 -->
          <ins class="price">
           <!--by.wpn 2017/5-12-->
             <{if $goods.products.member_state == 1}>
               <{$goods.products.mlv_price|cur_odr}>
             <{else}>
               <{$goods.products.price|cur_odr}>
             <{/if}>
          </ins>
	<!-- add这里是验证--未登录不显示价格-黄智坤06-20   -->
	<{/if}>
 	<!-- end这里是验证--未登录不显示价格-黄智坤06-20 -->	   
          <{if $point_status == 'on'}>
          <{if $goods.comments_count > 0}>
          <{if $commentListListnum=='true'}>
          <span class="goods-comment"><a href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>#product_comment"><b><{$goods.comments_count}></b><{t}>条评论<{/t}></a></span>
          <{/if}>
          <{else}>
          <{if $commentListListnum=='true'}>
          <span class="goods-comment"><{t}>暂无评论<{/t}></span>
          <{/if}>
          <{/if}>
          <{/if}>
          	<!-- add这里是验证--未登录不显示价格-黄智坤06-20   -->
	<{if $check_login == "login"}>
	<!-- end这里是验证--未登录不显示价格-黄智坤06-20 -->
          <{if $env.conf.b2c.site.show_mark_price == 'true'}>
          <del class="price"><{$goods.products.mktprice|cur_odr}></del>
          <{/if}>
          	<!-- add这里是验证--未登录不显示价格-黄智坤06-20   -->
	<{/if}>
 	<!-- end这里是验证--未登录不显示价格-黄智坤06-20 -->	 
        </div>
      </div>

      <div class="promotion-tags">
      
         <!--add hzk 06-05 provide promotion_data for lxs-->
         <div style="text-align:center;">
           <{foreach from=$goods.products.current_promotion.order item=promotion}>
         <div class="dcuxiao"><em class="label-alert"><{$promotion.tag}></em></div> 
         <!--  <div><{$promotion.name}></div> -->
    	 <{/foreach}>
    	 <div>
    	 <!-- add end -->
    	 
        <{if !$goods.products.promotion_type_name && $goods.promotion_tags && $env.conf.b2c.gallery.display.promotion == 'true'}>
        <{foreach from=$goods.promotion_tags item=pTag}>
        <span class="tag"><{$pTag.tag_name}></span>
        <{/foreach}>
        <{/if}>
		    <{if $goods.products.promotion_type_name }>
        <span class="tag"><{$goods.products.promotion_type_name}></span>
        <{/if}>
      </div>
      <div class="goods-action">
        <!--预售商品的显示判断-->
      <{if !isset($goods.prepare)}>
          <div class="goods-buy" style="text-align:center;">
            <{if $goods.products.store > 0}>
            <!-- 加入进货单 -->
            <{if $env.conf.b2c.gallery.display.buynum == 'true'}>
            <span class="p-quantity">
             <!--  <a href="javascript:void(0);" class="btn-decrease">-</a><input type="text" min="1" max="<{$goods.products.store|number}>" size="2" name="goods[num]" class="action-quantity-input" value="xxx"><a href="javascript:void(0);" class="btn-increase">+</a>-->
			 <a href="javascript:void(0);" class="btn-decrease">-</a><input type="text" min="<{if $peradd.isused==1}><{$peradd.pernum}><{else}><{$goods.per_add}><{/if}>" max="<{$goods.products.store|number}>" size="2" name="goods[num]" class="action-quantity-input" value="<{if $peradd.isused==1}><{$peradd.pernum}><{else}><{$goods.per_add}><{/if}>"><a href="javascript:void(0);" class="btn-increase">+</a>
               <input type="hidden"  class="action-quantity-input-getPeradd"  value="<{$goods.per_add}>">
               <input type="hidden"  class="action-quantity-input-havegift"  value="<{$goods.products.gift}>">
         		<input type="hidden"  class="action-quantity-input-getmaxbuy"  value="<{if $goods.products.gift =='havegift'}><{$goods.products.maxbuy|number}><{else}>0<{/if}>">
          
              <{if $env.conf.b2c.gallery.display.store_status == 'true'}>
              <{if $goods.products.store <= $env.conf.b2c.gallery.store_status.num}>

              <{/if}>
              <{/if}>
            </span>
              <span class="store-warn"><{t}>库存紧张<{/t}></span>
            <input type="hidden" name="goods[goods_id]" value="<{$goods.goods_id}>">
            <input type="hidden" name="goods[product_id]" value="<{$goods.products.product_id}>">
            <{/if}>
            <{if $env.conf.b2c.site.buy.target == '2'}>
            <{assign var='buytarget' value='_blank_cart'}>
            <{elseif $env.conf.b2c.site.buy.target == '3'}>
            <{assign var='buytarget' value='_dialog_minicart'}>
            <{/if}>
            <a class="btn btn-major action-addtocart" href="<{link app=b2c ctl=site_cart act=add arg0=goods arg1=$goods.goods_id arg2=$goods.products.product_id arg3=1}>"<{if $buytarget}> target="<{$buytarget}>"<{/if}>><span><span>加入购物车</span></span></a>
            <{elseif $goods.spec_desc && $goods.store}>
            <a class="btn btn-caution" href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>"><span><span>查看详情</span></span></a>
            <{else}>
            <!-- 到货通知 -->
            <a href="javascript:void(0);" class="btn btn-caution action-notify" rel="<{$goods.goods_id}>::<{$goods.products.product_id}>"><span><span>到货通知</span></span></a>
            <{/if}>
          </div>
           <{else}>
        <!--预售商品-->
          <div class="goods-buy">

            <!-- 加入进货单 -->
            <span class="p-quantity">
              <input type="text" min="1" readonly="true" max="<{$goods.products.store|number}>" size="2" name="goods[num]" class="action-quantity-input" value="1">

            </span>
            <input type="hidden" name="goods[goods_id]" value="<{$goods.goods_id}>">
            <input type="hidden" name="goods[product_id]" value="<{$goods.products.product_id}>">


            <a class="btn btn-major"  href="<{link app=b2c ctl=site_product arg0=$goods.products.product_id}>"><span><span>立即预定</span></span></a>

          </div>
        <{/if}>
        <div class="goods-others" style="text-align:center;">
          <{if $login=='nologin'}>
          <a href="<{link app=b2c ctl=site_passport act=login}>" class="btn btn-simple"><span><span>收藏</span></span></a>
          <{else}>
          <{if !$goods.is_fav}>
          <button type="button" class="btn btn-simple" rel="_favbtn_" data-gid="<{$goods.goods_id}>"><span><span>收藏</span></span></button>
          <button type="button" class="btn btn-plane" rev="_favbtn_" style="display:none;"><span><span>已收藏</span></span></button>
          <{else}>
          <button type="button" class="btn btn-simple" rel="_favbtn_" data-gid="<{$goods.goods_id}>" style="display:none;"><span><span>收藏</span></span></button>
          <button type="button" class="btn btn-plane" rev="_favbtn_"><span><span>已收藏</span></span></button>
          <{/if}>
          <{/if}>
                   	<!-- add这里是验证--未登录不显示价格-黄智坤06-20   -->
	<{if $check_login == "login"}>
          <button type="button" class="btn btn-simple action-compare" data-compare='{type_id:"<{$goods.type_id}>",goods_id:"<{$goods.goods_id}>",img:"<{$goods.image_default_id|storager:'s'}>",name:"<{$goods.name|strip_tags}>",
          price:"<{if $goods.products.member_state == 1}>
               <{$goods.products.mlv_price|cur_odr}>
             <{else}>
               <{$goods.products.price|cur_odr}>
             <{/if}>"}'><span><span>对比</span></span></button> <!--by.wpn 2017/5/12-->
             <{/if}>
        </div>
      </div>
    </li>
    <{/foreach}>
  </ul>
</div>
<{pagers data=$pager}>
